package com.caifu.service.impl;

import com.caifu.mapper.CDUserMapper;
import com.caifu.pojo.CDUser;
import com.caifu.service.CDUserService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 人员设备关联表 服务实现类
 * </p>
 *
 * @author tww
 * @since 2020-12-10
 */
@Service
public class CDUserServiceImpl extends ServiceImpl<CDUserMapper, CDUser> implements CDUserService {

    @Resource
    private CDUserMapper cdUserMapper;

    @Override
    public List<Map<String, Object>> listDeviceUser(Map map) throws Exception {
        try {
            return cdUserMapper.listDeviceUser(map);
        } catch (Exception e){
            e.printStackTrace();
            throw new Exception();
        }
    }

    @Override
    public int countDeviceUser(Map map) throws Exception {
        try {
            return cdUserMapper.countDeviceUser(map);
        } catch (Exception e){
            e.printStackTrace();
            throw new Exception();
        }
    }
}
